Repository navigation
[Maintainer] nodes: a cancel that only ends typed wall entry keeps the draft - #1251
Merged
Merged
Conversation
Follow-up to #1249. A first cancel from any source (Escape, ⌘Z mid-draft, a toolbar cancel) while a typed wall session is open now only clears the typed values; the next cancel drops the draft and the tool stays armed. - 3D wall tool: consume the first-stage cancel, as the cabinet tool does. - 2D-only plan: `endFloorplanWallTypingOnCancel` clears the session and keeps the plan's draft; in split view it defers to the 3D wall tool. Regression tests drive `cancelActiveTool()` (the ⌘Z path) through the real WallTool and the plan's cancel handler. Addresses Cursor Bugbot finding on #1249 ("Cancel during typed wall entry exits tool"). Co-authored-by: dkbbdev <dkbbdev@users.noreply.github.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Co-authored-by: dkbbdev <dkbbdev@users.noreply.github.com>
cursor Bot
pushed a commit
that referenced
this pull request
Nov 10, 2026
…ments
Conflicts:
- packages/editor/src/i18n/locales/{en,en-XA}/messages.ts: compiled
catalogs conflicted on both branches' new messages; regenerated with
`bun run i18n:extract` rather than hand-merged. `bun run i18n:check`
passes.
Everything else auto-merged; `bun run ci` covers the files both sides
touched (core/index.ts, floating-action-menu.tsx, en/messages.po).
Co-authored-by: sudhir <sudhir9297@gmail.com>
3 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Follow-up to #1249, addressing the Cursor Bugbot finding Cancel during typed wall entry exits tool, which landed unfixed when #1249 merged.
While a typed wall session is open, a first cancel from any source (Escape, ⌘Z mid-draft, a toolbar cancel) now only clears the typed values. The next cancel drops the draft, and the Wall tool stays armed. Before this change, Escape already behaved this way, but ⌘Z and other cancel sources fell through unconsumed, so the global handler exited to Select and discarded the draft.
packages/nodes/src/wall/tool.tsx): the first-stage cancel now callsmarkToolCancelConsumed()before clearing the session, the same way the cabinet tool does.floorplan-wall-typing-keys.ts,floorplan-panel.tsx): the plan'stool:cancelhandler had the same gap. A newendFloorplanWallTypingOnCancel()keeps the plan's draft. In 2D-only view it also clears the session and consumes the cancel. In split view it leaves both to the 3D wall tool.wiki/architecture/tools.mdnow says the first cancel from any source ends typed entry.There's one known limitation, which predates this PR: in split view, if the 3D tool's cancel listener runs before the plan's, the plan drops its copy of the draft while the 3D draft survives. Fixing it needs the 3D tool to publish a draft signal from the start click. Its chain start is only published after the first segment today, so this is left for a follow-up.
Typed wall length and angle entry is by @dkbbdev (#883, #887), combined in #1249. The fix and its tests are one squashed commit, and the docs are a separate commit; both carry a
Co-authored-bytrailer.How to test
bun dev, open a level, and pick the Wall tool in 3D-only view.3. The length HUD appears.Automated:
packages/nodes/src/wall/tool-typed-cancel.test.tsxrenders the real lineWallTooland drivescancelActiveTool(), the ⌘Z path. Two cases infloorplan-wall-typing-keys.test.tsxcover the 2D-only and split-view plan handler. Both tests fail without the fix and pass with it.bun run cipassed locally onbebb95fe, exit 0. The later commit changes only docs.Screenshots / screen recording
N/A. This is a keyboard behaviour fix covered by tests and has no visual change.
Checklist
bun devbun checkto verify)mainbranchNote
Low Risk
Targeted interaction fix in wall tool cancel handlers with new regression tests; no auth, data, or security surface.
Reviewed by Cursor Bugbot for commit 9236b27. Bugbot is set up for automated code reviews on this repo. Configure here.